import Field from './field';
/**
 * 文本字段类
 */
export default class TextField extends Field {
    constructor(options) {
        super(options);
        this.formatter = options.formatter;
    }
    // 设置单项数据
    setSpecifiedItem(newValue) {
        const { rowIndex, prop } = this;
        // 更新当前字段数值
        this.value = newValue;
        // 更新dom值
        this.$el.text(newValue);
        // 更新data数据值
        this.table.data[rowIndex][prop] = newValue;
    }
}